package com.fanqiechaodan.memento;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fanqiechaodan
 * @Classname Caretaker
 * @Description 管理者类
 */
public class Caretaker {

    private List<Memento> mementos = new ArrayList<>();

    public void addMemento(Memento m){
        mementos.add(m);
    }

    public Memento getMemento(int index){
        return mementos.get(index);
    }

}
